﻿using OddUserManager.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace OddUserManager.Service.IServices
{
    public interface IOddService
    {
        /// <summary>
        /// 更新投注单的详细投注内容
        /// </summary>
        /// <param name="id"></param>
        /// <param name="list"></param>
        /// <returns></returns>
        bool UpdateOddDetailsContents(int id, List<BetDetailOdd> list);

        List<Odd> GetOddsByCreateUserId(int id);
        List<Odd> GetAllList(int pageIndex, int pageSize, out int dataCount);

        List<Odd> GetOddsBySiteIds(string siteIds, int pageIndex, int pageSize, out int dataCount);

        List<Odd> GetOddsBySiteIds(string siteIds, int[] oddMoneyTypes, int oddState, int pageIndex, int pageSize, out int dataCount);
        List<Odd> GetAllList(int[] oddMoneyTypes, int oddState, int pageIndex, int pageSize, out int dataCount);
        /// <summary>
        /// 查询已经选择得比赛选项的投注数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        List<SelectedMatchOddData> GetSelectedMatchOddDataByMatchIds(List<int> ids);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        List<Odd> GetAllList();
        List<Odd> GetUnfinishedOdds();
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="startPage">起始页</param>
        /// <param name="pageSize">页面大小</param>
        /// <param name="rowCount">数据总数</param>
        /// <returns></returns>
        List<Odd> GetAllPageList(int startPage, int pageSize, out int rowCount, Func<Odd, bool> where, Func<Odd, object> order);

        /// <summary>
        /// 新增或修改
        /// </summary>
        /// <param name="dto">实体</param>
        /// <returns></returns>
        bool InsertOrUpdateOdd(Odd dto);

        /// <summary>
        /// 根据Id集合批量删除
        /// </summary>
        /// <param name="ids">Id集合</param>
        void DeleteBatchOdd(List<int> ids);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">Id</param>
        void DeleteOddById(int id);

        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        Odd GetOddById(int id);

        /// <summary>
        /// 更新投注单是否投注状态
        /// </summary>
        /// <param name="oddId"></param>
        /// <param name="certification"></param>
        /// <param name="confirmAppUserId"></param>
        void UpdateCertification(int oddId, bool certification, int confirmAppUserId);

        List<Odd> GetOddBySiteIdsAndTime(DateTime startTime, DateTime endTime, string siteIds);
        List<Odd> GetOddBySelectedMatchIds(List<int> ids);


    }
}
